package org.sbbs.base.demo.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.hibernate.annotations.Comment;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.FullTextField;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed;
import org.sbbs.base.jpa.entity.BaseEntity;

/**
 *
 * @author jenkins
 */
@Indexed(index = "demo-index")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Entity
@Table(name = "base_entity")
@Comment("基类测试样例实体表")
//@EntityListeners({AuditingEntityListener.class, AuditEntityAuditingListener.class})
public class BaseBean extends BaseEntity {

    /**
     * 名称
     */
    @FullTextField
    @Column(name = "name", length = 50)
    @Comment("名称")
    private String name;
    
    
    @Column(name = "age")
    @Comment("年龄")
    private Integer age;
    
    @Column(name = "address", length = 100)
    @Comment("地址")
    private String address;

}
